<template>
  <div id="wx_form">
    <div class="wx_formall">
      <div class="wx_form_title">
        {{ wxtitle }} <span>></span>
        <el-link class="wx_form_gd" type="primary">查看更多</el-link>
        <!-- 下拉选择 -->
        <div class="wx_select">
          <el-select
            v-model="wxvalue"
            placeholder="Select"
            size="small"
            :style="{ display: wxdisplay }"
          >
            <el-option
              v-for="item in wxcons"
              :key="item.value"
              :label="item.label"
              :value="item.value"
            />
          </el-select>
        </div>
        <!-- 日期单选 -->
        <el-radio-group v-model="radio1" size="small" class="wx_radio">
          <el-radio-button label="本月" />
          <el-radio-button label="上月" />
          <el-radio-button label="本周" />
          <el-radio-button label="上周" />
        </el-radio-group>
      </div>
      <div class="wx_table_form">
        <div class="wx_alldaqu" v-for="(item, index) in wxtableData">
          <div class="wx_alldaqu_paming wx_paiming">
            {{ index + 1 }}
          </div>
          <div class="wx_alldaqu_paming">
            <div class="wx_alldaqu_top">{{ item.name }}</div>
            <div class="wx_alldaqu_bottom wx_alldaqu_none">
              {{ item.namecity }}
            </div>
          </div>
          <div class="wx_alldaqu_paming">
            <div class="wx_alldaqu_top">{{ item.sets }}</div>
            <div class="wx_alldaqu_bottom">成交套数</div>
          </div>
          <div class="wx_alldaqu_paming">
            <div class="wx_alldaqu_top">{{ item.achievement }}</div>
            <div class="wx_alldaqu_bottom">成交业绩</div>
          </div>
          <div class="wx_alldaqu_paming">
            <div class="wx_alldaqu_top">{{ item.average_performance }}</div>
            <div class="wx_alldaqu_bottom">单均业绩</div>
          </div>
          <div class="wx_alldaqu_paming">
            <div class="wx_alldaqu_top">{{ item.net_performance }}</div>
            <div class="wx_alldaqu_bottom">销售业绩净额</div>
          </div>
          <div class="wx_alldaqu_paming">
            <div class="wx_alldaqu_top">{{ item.commission }}</div>
            <div class="wx_alldaqu_bottom">客户返佣</div>
          </div>
          <div class="wx_alldaqu_paming">
            <div class="wx_alldaqu_top">{{ item.oldandnew }}</div>
            <div class="wx_alldaqu_bottom">老带新</div>
          </div>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  // 可以理解为注册绑定参数，并赋默认值
  props: {
    wxtitle: "",
    wxcons: [],
    wxvalue: "",
    radio1: "",
    wxtableData: [],
    wxdisplay: "",
  },
  mounted() {
    //this.$root => app
  },
};
</script>

<style lang="scss" scoped>
#wx_form {
  width: 100%;
  background-color: #fafafa;
  padding-bottom: 20px;
}
.wx_formall {
  width: 96%;
  margin: 0 auto;
}
.wx_form_title {
  width: 100%;
  display: flex;
  padding-top: 10px;
  font-size: 16px;
  font-weight: 600;
  color: #303030;
  line-height: 22px;
}
.wx_form_title span {
  color: #767676;
  margin-left: 9px;
}
.wx_form_gd {
  margin-left: 9px;
}
.wx_select {
  width: 182px;
  margin-left: 50%;
}
.wx_table_form {
  margin-top: 10px;
}
.wx_alldaqu {
  width: 100%;
  height: 60px;
  background-color: #fff;
  margin-top: 10px;
  display: flex;
}
.wx_paiming {
  width: 5% !important;
  line-height: 60px;
  text-align: center !important;
  font-size: 24px;
  font-weight: 400;
  color: #303030;
  padding-left: 0 !important;
}
.wx_alldaqu_paming {
  width: 13%;
  text-align: left;
  padding-left: 10px;
  // line-height: 60px;
}
.wx_alldaqu_top {
  height: 35px;
  line-height: 35px;

  font-size: 16px;
  font-weight: 500;
  color: #303030;
}
.wx_alldaqu_bottom {
  height: 30px;
  font-size: 12px;
  font-weight: 400;
  color: #858b94;
  line-height: 17px;
  // line-height: 30px;
}
.wx_alldaqu_none {
  width: 90%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.wx_radio {
  margin-left: 16px;
}
</style>